
/*****************************************************************************
 *
 * 作   者: 马婷婷 * 创建时间: 2020/12/15 15:46:09 *
 * Copyright (C) 2008 - 鹏业软件公司
 *
 *****************************************************************************/

import {DataPacket, NorDataList} from 'pengesoft-ng-lib';
import {SalaryRecordsRec} from './salary-records-rec.domain';

/**
 *
 */
export class SalaryDto extends DataPacket {
// <<<<<<< HEAD
//   salaryRecords: SalaryRecordsRec;
//   startSalary: number;
//   nowSalary: number;
//
//   constructor(options: {
//     salaryRecords?: SalaryRecordsRec;
//     startSalary?: number;
//     nowSalary?: number;
//   } = {}) {
//     super();
//     this.salaryRecords = new SalaryRecordsRec(options?.salaryRecords);
//     this.startSalary = !options.startSalary ? 0 : Number.parseFloat(options.startSalary.toString());
//     this.nowSalary = !options.nowSalary ? 0 : Number.parseFloat(options.nowSalary.toString());
// =======
  SalaryRecords: SalaryRecordsRec;
  StartSalary: number;
  NowSalary: number;

  constructor(options: {
    SalaryRecords?: SalaryRecordsRec;
    StartSalary?: number;
    NowSalary?: number;
  } = {}) {
    super();
    this.SalaryRecords = new SalaryRecordsRec(options?.SalaryRecords);
    this.StartSalary = !options.StartSalary ? 0 : Number.parseFloat(options.StartSalary.toString());
    this.NowSalary = !options.NowSalary ? 0 : Number.parseFloat(options.NowSalary.toString());
// >>>>>>> 114a0271d9ae48d67f42c6a79764287a47013b8b
  }
}

/**
 * 列表
 */
export class SalaryDtoList extends NorDataList<SalaryDto> {

  constructor(options: {
    _Items?: Array<SalaryDto>
  } = {}) {
    super();
    if (options._Items) {
      for (const item of options._Items) {
        this.append(new SalaryDto(item));
      }
    }
  }
}
